/*******************************************************************************
 * Package: com.song.boot.springstudy
 * Type:    Test2
 * Date:    2022-06-23 16:32
 *
 * Copyright (c) 2022 HUANENG GUICHENG TRUST CORP.,LTD All Rights Reserved.
 *
 * You may not use this file except in compliance with the License.
 *******************************************************************************/
package com.song.boot.springstudy;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 功能描述：
 *
 * @author Songxianyang
 * @date 2022-06-23 16:32
 */
public class Test2 {
    public static void main(String[] args) {
        List<Integer> integers = Arrays.asList(1, 2, 3, 4, 5);
        List<Integer> integerList = Arrays.asList(2, 3, 4, 6);
        List<Integer> collect = integers.stream().filter(integer -> !integerList.contains(integer))
                .collect(Collectors.toList());
        System.out.println(collect);
    }
}
